let container = new Vue({
    el:".container",
    data:{
        rareAnimals:[],
        animals:[],
        animalNews:[],
        animalRescues:[],
    },
    methods:{
        //加载珍奇动物
        loadRareAnimals:function () {
            axios({
                url:"/zoosite/dwRareAnimal/loadrareanimals",
                method:"get",
            }).then(function (response) {
                container.rareAnimals = response.data;
            })
        },
        //加载动物观赏指南
        loadAnimals:function () {
            axios({
                url:"/zoosite/dwWatchGuide/loadanimals",
                method:"get",
            }).then(function (response) {
                container.animals = response.data;
            })
        },
        //加载动物趣闻
        loadAnimalNews:function () {
            axios({
                url:"/zoosite/dwAnimalNews/loadAnimalNews",
                method:"get",
            }).then(function (response) {
                container.animalNews= response.data;
            })
        },
        //加载动物救助信息
        loadanimalRescues:function () {
            axios({
                url:"/zoosite/dwAnimalRescue/loadanimalRescues",
                method:"get",
            }).then(function (response) {
                container.animalRescues= response.data;
            })
        }
    },
    created:function () {
        this.loadRareAnimals();
        this.loadAnimals();
        this.loadAnimalNews();
        this.loadanimalRescues();
    }
})